package com.yhy.dubbo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yhy.domain.Announcement;

import com.yhy.domain.vo.AnnouncementVo;
import com.yhy.dubbo.api.MessageApi;
import com.yhy.mapper.MessageMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class MessageApiImpl implements MessageApi {

    @Autowired
    private MessageMapper messageMapper;

    @Override
    public IPage<AnnouncementVo> findByPage(Integer page, Integer pagesize) {
        Page<AnnouncementVo> pages = new Page<>(page,pagesize);
        return messageMapper.selectPage(pages,null);
    }
}
